package com.asset.salesforce.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.asset.salesforce.dao.ViewSelectedFieldsDaoImpl;
import com.asset.salesforce.domain.ViewSelectedFields;

@Service
@Transactional(readOnly = true)
public class ViewSelectedFieldsService {
	@Autowired
	private ViewSelectedFieldsDaoImpl viewSelectedFieldsDao;
	
	public List<ViewSelectedFields> getViewSelesctedFields(Integer viewId ) {
		return viewSelectedFieldsDao.getViewSelectedFields(viewId);
	}
	@Transactional(readOnly = false)
	public void addViewSelectedField(ViewSelectedFields viewSelectedField){
		viewSelectedFieldsDao.addView(viewSelectedField);
	}
	public ViewSelectedFields getViewSelectedFieldById(Integer Id ) {
		return viewSelectedFieldsDao.getViewSelectedFieldById(Id);
	}
	@Transactional(readOnly = false)
	public void saveOrupdate(ViewSelectedFields viewSelectedField){
		viewSelectedFieldsDao.saveOrupdate(viewSelectedField);
	}
	public ViewSelectedFields loadViewSelectedField(Integer id) {
		return viewSelectedFieldsDao.loadViewSelectedField(id);
	}
	@Transactional(readOnly = false)
	public void deleteViewSelectedField(ViewSelectedFields viewSelectedField) {
		viewSelectedFieldsDao.deleteView(viewSelectedField);
	}
}
